<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let arr = [1, 2, 3];
        let arr2 = arr;
        let arr3 = [];
        for (let i = 0; i < arr.length; i++) {
            arr3.push(arr[i]);
        };
        let arr4 = [...arr];
        arr.push(4);
        // alert(arr2);
        // alert(arr4);

        function fnAdd(a, b, c) {
            alert(a + b + c);
        };
        fnAdd(...arr);

        function fnAlert(...a) {
            console.log(a);
        };
        fnAlert(10, 5, 6);
    </script>
</head>
<body>
    
</body>
</html>